package com.turato.responsibility;

/**
 * @author tuhao
 * @date 2021/1/24 4:45 下午
 * @desc
 */
public class TomatoCookHandler extends CookHandler {
    private String dealName = "处理番茄";

    public TomatoCookHandler(String dealName) {
        this.dealName = dealName;
    }
    @Override
    protected void handleRequest(CookHandlerRequest request) {
        if(null == request) {
            System.out.println("=======TomatoCookHandler:不处理=======");
            return;
        }
        System.out.println("=======TomatoCookHandler:处理番茄=======");
        if ( null != this.getNext()) {
            this.getNext().handleRequest(request);
        } else {
            System.out.println("=======TomatoCookHandler:烹饪结束=======");
        }
    }
}
